<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, ininial-scale=1.0">
    <link rel="stylesheet" type="text/css" href="../../static/lib/Semantic-UI/dist/semantic.min.css"
          th:href="@{/lib/Semantic-UI/dist/semantic.min.css}">
    <link rel="stylesheet" type="text/css" href="../../static/css/me.css" th:href="@{/css/me.css}">
    <title>后台登录</title>
</head>
<body>

    <div class="m-container-small m-padded-td-bigs" style="max-width: 30em !important;">
        <div class="ui contaier">
            <div class="ui middle aligned center aligned grid">
                <div class="column">
                    <h2 class="ui teal image header">
                        <img src="../../static/images/1.jpg" th:src="@{/images/1.jpg}" class="image">
                        <div class="content">
                            博客管理后台登录
                        </div>
                    </h2>
                    <form class="ui large form" method="post" action="#" th:action="@{/admin/login}">
                        <div class="ui segment">
                            <div class="field">
                                <div class="ui left icon input">
                                    <i class="user icon"></i>
                                    <input type="text" name="username" placeholder="账号">
                                </div>
                            </div>
                            <div class="field">
                                <div class="ui left icon input">
                                    <i class="lock icon"></i>
                                    <input type="password" name="password" placeholder="密码">
                                </div>
                            </div>
                            <button class="ui fluid large teal submit button">登录</button>
                        </div>

                        <div class="ui error mini message"></div>
                        <div class="ui negative mini message" th:unless="${#strings.isEmpty(message)}" th:text="${message}"></div>
                    </form>

                </div>
            </div>
        </div>
    </div>


<script
        src="https://code.jquery.com/jquery-3.1.1.min.js"
        integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
        crossorigin="anonymous"></script>
<script src="../../static/lib/Semantic-UI/dist/semantic.min.js"
        th:src="@{/lib/Semantic-UI/dist/semantic.min.js}"></script>

<script>
    $('.ui.form').form({
        fields: {
            username: {
                identifier: 'username',
                rules: [{
                    type: 'empty',
                    prompt: '请输入用户名'
                }]
            },
            password: {
                identifier: 'password',
                rules: [{
                    type: 'empty',
                    prompt: '请输入账户密码'
                }]
            }
        }
    });
</script>
</body>
</html>